import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { InventoryComponent } from './pages/inventory/inventory.component';
import { InventoryDetailComponent } from './pages/inventory-detail/inventory-detail.component';
import { ReportedDetailComponent } from './pages/reported-detail/reported-detail.component';
import { ReportedComponent } from './pages/reported/reported.component';
import { PersonnelComponent } from './pages/personnel/personnel.component';
import { CommissionComponent } from './pages/commission/commission.component';
import { PlateComponent } from './pages/plate/plate.component';
const routes: Routes = [
    {
        path: 'inventory',
        component: InventoryComponent,
        data: { breadcrumbs: [{ title: '仓库盘点' }] },
        children: [
            {
                path: 'detail/:id',
                component: InventoryDetailComponent,
                data: { breadcrumbs: [{ title: '仓库盘点列表', path: '/fullname/inventory' }, { title: '盘点详情' }] },
            },
            {
                path: 'detail',
                component: InventoryDetailComponent,
                data: { breadcrumbs: [{ title: '仓库盘点列表', path: '/fullname/inventory' }, { title: '添加盘点' }] },
            },
        ]
    },
    {
        path: 'reported',
        component: ReportedComponent,
        children: [
            {
                path: 'detail', component: ReportedDetailComponent, data: {
                    breadcrumbs: [{ title: '库存报损列表', path: '/fullname/reported' }, { title: '添加报损' }]
                },
            },
            {
                path: 'detail/:id', component: ReportedDetailComponent, data: {
                    breadcrumbs: [{ title: '库存报损列表', path: '/fullname/reported' }, { title: '报损详情' }]
                }
            },
        ],
        data: {
            breadcrumbs: [{ title: '库存报损列表' }]
        }
    },
    {
        path: 'personnel',
        component: PersonnelComponent,
        data: {
            breadcrumbs: [{ title: '仓库人员设置' }]
        }
    },
    {
        path: 'commission',
        component: CommissionComponent,
        data: {
            breadcrumbs: [{ title: '仓库提成设置' }]
        }
    },
    {
        path: 'plate',
        component: PlateComponent,
        data: {
            breadcrumbs: [{ title: '大屏幕看板' }]
        }
    },
];

export const declarationComponents = [
    InventoryComponent,
    InventoryDetailComponent,
    ReportedComponent,
    PersonnelComponent,
    ReportedDetailComponent,
    CommissionComponent,
    PlateComponent
];

export const entryComponents = [
];

@NgModule({
    imports: [
        RouterModule.forChild(routes)
    ],
    exports: [
        RouterModule
    ]
})
export class FullnameRoutingModule { }
